<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>

    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{lib/css/main.css}">
    <link rel="stylesheet" th:href="@{/lib/css/public_permission.css}">

    <script th:src="@{/lib/js/jquery-3.4.1.min.js}"></script>
    <script th:src="@{/layui/layui.js}"></script>




</head>
<script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;

        //…
    });
</script>
<style>

    .layui-form{
        width:600px;
    }
    body{
        background-image: url("images/background/page_bg.JPG");
        background-size: 100%;

    }

</style>

<body>
<!--<div th:replace="menu/left :: leftbar" ></div>-->
<!--<div th:replace="menu/top :: topbar"></div>-->


<div class="table">
    <h2 class="tablename">添加角色</h2>
    <hr class="layui-bg-green">
    <form class="layui-form" action="addrole">
        <div class="layui-form-item">
            <label class="layui-form-label">角色名称:</label>
            <div class="layui-input-block">
                <input type="text" name="role" required  lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">描述信息:</label>
            <div class="layui-input-block">
                <input type="text" name="role_describe" required  lay-verify="required" placeholder="请输入角色描述信息" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">操作权限:</label>
            <div class="layui-input-block">

                <input type="checkbox" name="permission" th:value="${permission.permissionid}" th:title="${permission.permission_describe}" th:each="permission:${permissionList}" th:if="${permission.permissionid =='01' || permission.permissionid =='02'|| permission.permissionid =='03'|| permission.permissionid =='04'}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">菜单权限:</label>
            <div class="layui-input-block">
                <input type="checkbox" name="permission" th:value="${permission.permissionid}" th:title="${permission.permission_describe}" th:each="permission:${permissionList}" th:if="${permission.permissionid !='01' && permission.permissionid !='02'&& permission.permissionid !='03'&& permission.permissionid !='04'}">

            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

    <script>
        //Demo
        layui.use('form', function(){
            var form = layui.form;

            //监听提交
//            form.on('submit(formDemo)', function(data){
//                layer.msg(JSON.stringify(data.field));
//                return false;
//            });
        });
    </script>
</div>



</body>

</html>